package com.i8office.android.zhihuixinwu.ui.schedule;

import com.i8office.android.zhihuixinwu.bean.TitleItemTag;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class EventItem extends TitleItemTag implements Serializable {
    /**
     * TaskID : 6bc23d82-1b15-4393-b1ad-d071a60af9a9
     * EmplID : 100001
     * Title : 哈哈哈哈哈哈哈哈
     * IsFinished : false
     * CreateTime : 2019-05-13T10:54:15.35
     * StartDateString : 2019-05-13
     * StartYear : 2019
     * StartMonth : 5
     * StartDay : 13
     * StartHour : 10
     * StartMinute : 0
     * RemindTimeOffsetMinutes : 30
     * StartTimeString : 10:00
     * IsRemind : true
     * RemindTimeString : 提醒已过期
     * HasAttachment : false
     * IsSharedToOthers : false
     * SharedFromUserID :
     * SharedFromUserName :
     * SharedFromTaskID :
     * UserSort :
     * Location :
     * IsImportant : false
     * StarTag :
     * ShareTooltips :
     * ShareStatus :
     * DeptName :
     * TimeQuantum : 1
     */

    private String TaskID;
    private String EmplID;
    private String Title;
    private boolean IsFinished;
    private String CreateTime;
    private String StartDateString;
    private int StartYear;
    private int StartMonth;
    private int StartDay;
    private int StartHour;
    private int StartMinute;
    private String RemindTimeOffsetMinutes;
    private String StartTimeString;
    private boolean IsRemind;
    private String RemindTimeString;
    private boolean HasAttachment;
    private boolean IsSharedToOthers;
    private String SharedFromUserID;
    private String SharedFromUserName;
    private String SharedFromTaskID;
    private String UserSort;
    private String Location;
    private boolean IsImportant;
    private String StarTag;
    private String ShareTooltips;
    private String ShareStatus;
    private String DeptName;
    private String Desc;
    private String JoinLeaders;
    private int TimeQuantum;
    private String time12;
    private int CanEdit = 1;

    public String getStartTime12() {
        String tt = "";
        switch (TimeQuantum) {
            case 1:
                tt = "上午";
                break;
            case 2:
            case 3:
                tt = "下午";
                break;
        }
        if (time12 == null) {
            if ("--:--".equals(StartTimeString)) {
                time12 = tt + StartTimeString;
            } else {
                time12 = tt + gethmTime();
            }
        }
        return time12;
    }

    public String getTaskID() {
        return TaskID;
    }

    public void setTaskID(String TaskID) {
        this.TaskID = TaskID;
    }

    public String getEmplID() {
        return EmplID;
    }

    public void setEmplID(String EmplID) {
        this.EmplID = EmplID;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String Title) {
        this.Title = Title;
    }

    public boolean isIsFinished() {
        return IsFinished;
    }

    public void setIsFinished(boolean IsFinished) {
        this.IsFinished = IsFinished;
    }

    public String getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(String CreateTime) {
        this.CreateTime = CreateTime;
    }

    public String getStartDateString() {
        return StartDateString;
    }

    public void setStartDateString(String StartDateString) {
        this.StartDateString = StartDateString;
    }

    public int getStartYear() {
        return StartYear;
    }

    public void setStartYear(int StartYear) {
        this.StartYear = StartYear;
    }

    public int getStartMonth() {
        return StartMonth;
    }

    public void setStartMonth(int StartMonth) {
        this.StartMonth = StartMonth;
    }

    public int getStartDay() {
        return StartDay;
    }

    public void setStartDay(int StartDay) {
        this.StartDay = StartDay;
    }

    public int getStartHour() {
        return StartHour;
    }

    public void setStartHour(int StartHour) {
        this.StartHour = StartHour;
    }

    public int getStartMinute() {
        return StartMinute;
    }

    public void setStartMinute(int StartMinute) {
        this.StartMinute = StartMinute;
    }

    public String getRemindTimeOffsetMinutes() {
        return RemindTimeOffsetMinutes;
    }

    public void setRemindTimeOffsetMinutes(String RemindTimeOffsetMinutes) {
        this.RemindTimeOffsetMinutes = RemindTimeOffsetMinutes;
    }

    public String getStartTimeString() {
        return StartTimeString;
    }

    public void setStartTimeString(String StartTimeString) {
        this.StartTimeString = StartTimeString;
    }

    public boolean isIsRemind() {
        return IsRemind;
    }

    public void setIsRemind(boolean IsRemind) {
        this.IsRemind = IsRemind;
    }

    public String getRemindTimeString() {
        return RemindTimeString;
    }

    public void setRemindTimeString(String RemindTimeString) {
        this.RemindTimeString = RemindTimeString;
    }

    public boolean isHasAttachment() {
        return HasAttachment;
    }

    public void setHasAttachment(boolean HasAttachment) {
        this.HasAttachment = HasAttachment;
    }

    public boolean isIsSharedToOthers() {
        return IsSharedToOthers;
    }

    public void setIsSharedToOthers(boolean IsSharedToOthers) {
        this.IsSharedToOthers = IsSharedToOthers;
    }

    public String getSharedFromUserID() {
        return SharedFromUserID;
    }

    public void setSharedFromUserID(String SharedFromUserID) {
        this.SharedFromUserID = SharedFromUserID;
    }

    public String getSharedFromUserName() {
        return SharedFromUserName;
    }

    public void setSharedFromUserName(String SharedFromUserName) {
        this.SharedFromUserName = SharedFromUserName;
    }

    public String getSharedFromTaskID() {
        return SharedFromTaskID;
    }

    public void setSharedFromTaskID(String SharedFromTaskID) {
        this.SharedFromTaskID = SharedFromTaskID;
    }

    public String getUserSort() {
        return UserSort;
    }

    public void setUserSort(String UserSort) {
        this.UserSort = UserSort;
    }

    public String getLocation() {
        return Location;
    }

    public void setLocation(String Location) {
        this.Location = Location;
    }

    public boolean isIsImportant() {
        return IsImportant;
    }

    public void setIsImportant(boolean IsImportant) {
        this.IsImportant = IsImportant;
    }

    public String getStarTag() {
        return StarTag;
    }

    public void setStarTag(String StarTag) {
        this.StarTag = StarTag;
    }

    public String getShareTooltips() {
        return ShareTooltips;
    }

    public void setShareTooltips(String ShareTooltips) {
        this.ShareTooltips = ShareTooltips;
    }

    public String getShareStatus() {
        return ShareStatus;
    }

    public void setShareStatus(String ShareStatus) {
        this.ShareStatus = ShareStatus;
    }

    public String getDeptName() {
        return DeptName;
    }

    public void setDeptName(String DeptName) {
        this.DeptName = DeptName;
    }

    public int getTimeQuantum() {
        return TimeQuantum;
    }

    public void setTimeQuantum(int TimeQuantum) {
        this.TimeQuantum = TimeQuantum;
    }

    public String getJoinLeaders() {
        return JoinLeaders;
    }

    public void setJoinLeaders(String joinLeaders) {
        JoinLeaders = joinLeaders;
    }

    public String getHMTime() {
        SimpleDateFormat format = new SimpleDateFormat("HH:mm");
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, StartHour);
        calendar.set(Calendar.MINUTE, StartMinute);
        return format.format(calendar.getTimeInMillis());
    }
    public String gethmTime() {
        SimpleDateFormat format = new SimpleDateFormat("hh:mm");
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, StartHour);
        calendar.set(Calendar.MINUTE, StartMinute);
        return format.format(calendar.getTimeInMillis());
    }

    public int getCanEdit() {
        return CanEdit;
    }

    public void setCanEdit(int canEdit) {
        CanEdit = canEdit;
    }

    public String getDesc() {
        return Desc;
    }

    public void setDesc(String desc) {
        Desc = desc;
    }

}
